﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="ImportExport.aspx.cs" Inherits="ImportExport" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageBody" Runat="Server">
    <div>
    
    </div>
    <asp:FileUpload ID="fileUpload1" runat="server" 
        ondatabinding="fileUpload1_Click" />
    <br />
    <asp:Button ID="importbutton" runat="server" onclick="importbutton_Click" 
        Text="Import To Database" />
    <p>
        <asp:Label ID="UploadStatusLabel" runat="server"></asp:Label>
    </p>
    <p>
        <asp:Label ID="testlabel" runat="server" Text="Label"></asp:Label>
    </p>
    <div>
    
    </div>
    <asp:DropDownList ID="GroupNameDropDown" runat="server" Width="202px"
        AutoPostBack="True" DataSourceID="TeamNameDataSource"
        DataTextField="group_name" DataValueField="group_name" 
        AppendDataBoundItems="True">
    <asp:ListItem Value="-1" Text="Choose a Group..." />
    </asp:DropDownList>
    <asp:SqlDataSource ID="TeamNameDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:INB201ConnectionString %>" 
        SelectCommand="SELECT DISTINCT [group_name] FROM [users]">
    </asp:SqlDataSource>
    <br />
    <asp:Button ID="groupexportbutton" runat="server" 
        onclick="exportgroupbutton_click" Text="Export Group Info" Width="168px" />
    <br />
    <br />
    <asp:DropDownList ID="StudentNameDropDown" runat="server" 
        DataSourceID="StudentNameDataSource" DataTextField="user_name" 
        DataValueField="user_name" Height="22px" Width="204px"
        AppendDataBoundItems="True">
    <asp:ListItem Value="-1" Text="Choose a Student..." />
    </asp:DropDownList>
    <asp:SqlDataSource ID="StudentNameDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:INB201ConnectionString %>" 
        SelectCommand="SELECT DISTINCT [user_name], [user_id] FROM [users] WHERE ([user_type] = @user_type)">
        <SelectParameters>
            <asp:Parameter DefaultValue="Student" Name="user_type" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
    <p>
        <asp:Button ID="exportResultsButton" runat="server" Text="Export results" 
            Width="169px" onclick="exportResultsButton_Click" style="height: 26px" />
    </p>
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</asp:Content>

